{extend name="public/base" /}

{block name="title"}<title>{:config('dbconfig.sys.top_big_logo')}</title>{/block}

{block name="pjax_container"}
<section class="content">
    <div class="row">
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-yellow">
                <div class="inner"><h4>{$data.admin_total}</h4><p>{:lang('admin_total')}</p></div>
                <div class="icon"><i class="fa fa-users"></i></div>
<!--                <a href="{:url('Admin/index')}" class="small-box-footer">{:lang('more')} <i class="fa fa-arrow-circle-right"></i></a>-->
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-green">
                <div class="inner"><h4>{$data.user_total}</h4><p>会员总数</p></div>
                <div class="icon"><i class="fa fa-user-plus"></i></div>
<!--                <a href="{:url('Member/index')}" class="small-box-footer">{:lang('more')} <i class="fa fa-arrow-circle-right"></i></a>-->
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-aqua">
                <div class="inner"><h4>{$data.yesterday_user_num}</h4><p>昨日新增会员</p></div>
                <div class="icon"><i class="fa fa-file-text"></i></div>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-red">
                <div class="inner"><h4>{$data.yesterday_pledge_lp_num}</h4><p>昨日质押LP数量</p></div>
                <div class="icon"><i class="fa fa-commenting"></i></div>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-yellow">
                <div class="inner"><h4>{$data.yesterday_rele_pledge_lp_num}</h4><p>昨日解押LP数量</p></div>
                <div class="icon"><i class="fa fa-commenting"></i></div>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-green">
                <div class="inner"><h4>{$data.yesterday_cash_token_money}</h4><p>昨日提取代币数量</p></div>
                <div class="icon"><i class="fa fa-commenting"></i></div>
            </div>
        </div>
        {if condition = "0"}
            <div class="col-lg-3 col-sm-6 col-xs-12">
                <div class="small-box bg-aqua">
                    <div class="inner"><h3>{$data.archive_total}</h3><p>{:lang('archive_total')}</p></div>
                    <div class="icon"><i class="fa fa-file-text"></i></div>
    <!--                <a href="{:url('Archive/index')}" class="small-box-footer">{:lang('more')} <i class="fa fa-arrow-circle-right"></i></a>-->
                </div>
            </div>
            <div class="col-lg-3 col-sm-6 col-xs-12">
                <div class="small-box bg-red">
                    <div class="inner"><h3>{$data.comment_total}</h3><p>{:lang('comment_total')}</p></div>
                    <div class="icon"><i class="fa fa-commenting"></i></div>
    <!--                <a href="{:url('Comment/index')}" class="small-box-footer">{:lang('more')} <i class="fa fa-arrow-circle-right"></i></a>-->
                </div>
            </div>
        {/if}
        
        <div class="clearfix"></div>
        {if condition = "0"}
        <div class="col-lg-6 col-sm-6 col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">{:lang('login_30_count')}</h3>
                </div>
                <div class="box-body">
                    <canvas id="login-line" height="312"></canvas>
                </div>
            </div>
        </div>
        <div class="col-lg-6 col-sm-6 col-xs-12">
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">{:lang('login_new')}</h3>
                </div>
                <div class="box-body no-padding">
                    <table class="table table-hover">
                        <tr>
                            <th>{:lang('login_l_ip')}</th>
                            <th>{:lang('login_l_address')}</th>
                            <th>{:lang('login_l_time')}</th>
                        </tr>
                        {volist name="data.login_list" id="vo"}
                        <tr>
                            <td><span class="label label-success">{$vo.ip}</span></td>
                            <td>{$vo.country} {$vo.province} {$vo.city} {$vo.district}</td>
                            <td>{$vo.create_time|time_line}</td>
                        </tr>
                        {/volist}
                    </table>
                </div>
            </div>
        </div>
        {/if}
        
        <div class="clearfix"></div>
        {if condition = "0"}
        <div class="col-lg-6 col-sm-6 col-xs-12">
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">{:lang('system_config')}</h3>
                </div>
                <div class="box-body no-padding">
                    <table class="table table-hover">
                        {volist name="data.system_config" id="vo" }
                        <tr>
                            <td>{$key}：{$vo}</td>
                        </tr>
                        {/volist}
                    </table>
                </div>
            </div>
        </div>
        <div class="col-lg-6 col-sm-6 col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">{:lang('system_widgets')}</h3>
                </div>
                <div class="box-body">
                    <a href="{:url('Widgets/widgetInput')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Input
                    </a>
                    <a href="{:url('Widgets/widgetSelect')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Select
                    </a>
                    <a href="{:url('Widgets/widgetTextarea')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Textarea
                    </a>
                    <a href="{:url('Widgets/widgetCheckbox')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Checkbox
                    </a>
                    <a href="{:url('Widgets/widgetRadio')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Radio
                    </a>
                    <a href="{:url('Widgets/widgetDate')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Date
                    </a>
                    <a href="{:url('Widgets/widgetContent')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> Content
                    </a>
                    <a href="{:url('Widgets/widgetFileUpload')}" class="btn btn-app">
                        <i class="fa fa-gear"></i> FileUpload
                    </a>
                    <a href="{:url('Widgets/widgetText')}" class="btn btn-app">
                        <span class="badge bg-red">new</span>
                        <i class="fa fa-gear"></i> Text
                    </a>
                    <a href="{:url('Widgets/widgetSwitchs')}" class="btn btn-app">
                        <span class="badge bg-red">new</span>
                        <i class="fa fa-gear"></i> Switchs
                    </a>
                </div>
            </div>
        </div>
        {/if}
    </div>
</section>
<script>
$(function () {
    var loginline = document.getElementById('login-line').getContext('2d');
    new Chart(loginline, {
        type: 'line',
        data: {$data.login_line_json},
        options: {
            responsive: true,
            maintainAspectRatio: false
        }
    });
});
</script>
{/block}